#####################################################################
##
## FILE:	Makefile
## PROJECT:	CS 3251 Project 2 - Ram Subramanian and Nicolas Papin
## DESCRIPTION: Compile Project 2
##
#####################################################################

CC=gcc

SHARED=gpsConn.o
OPTS=-lpthread

OS := $(shell uname -s)

# Extra LDFLAGS if Solaris
ifeq ($(OS), SunOS)
	LDFLAGS=-lsocket -lnsl
    endif

all: gpsClient gpsServer

gpsClient: gpsClient.o $(SHARED)
	$(CC) $(SHARED) gpsClient.o -o gpsClient $(OPTS)

gpsServer: gpsServer.o list.o $(SHARED)
	$(CC) $(SHARED) gpsServer.o list.o -o gpsServer $(OPTS)

clean:
	rm -f gpsClient gpsServer *.o

